home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- * *
- * XRF input file output file [/s] *
- * *
- * Source file name: XRF_V123.C *
- * *
- * DESCRIPTION: *
- * *
- * Cross Reference & Block Structure *
- * Version 1.23 October 10, 1988 *
- * *
- * 'XRF' is a cross-reference block-structure program *
- * written in C for C and similar languages. It has the *
- * following features: *
- * *
- * 1) Single spaced cross-reference list *
- * *
- * 2) Block structure in output program, *
- * nested blocks included *
- * *
- * 3) Removal of tabs in output file as some printers *
- * don't support them *
- * *
- * 4) Strip white space from end of lines in output files *
- * *
- * 5) Works on C or Telix SALT script source files *
- * *
- * *
- * FUNCTIONS: *
- * *
- * Function Description *
- * -------- ----------- *
- * get_token Returns a valid identifier or reserved word. *
- * getch Returns a character from the character buffer *
- * and when ready for new line prints line to file. *
- * ungetch Puts the character optained by getch back in *
- * the character buffer. *
- * getline Gets a line of text from a file, removes tabs, *
- * and removes white space from the end of the line. *
- * ungetline Puts a line of text in the character buffer. *
- * checktoken Compares the token with Beginning and end of *
- * block characters. *
- * in_comment Skips over comments in a file. *
- * in_salt_comment Skips over comments in a SALT file. *
- * in_quote Skips over quotes in a file. *
- * in_salt_quote Skips over quotes in a SALT file. *
- * line_hdr Puts dashes in place of leading blanks on the *
- * front of a line. *
- * block_line_hdr Puts block information in front of the line *
- * and adds a new line to the output file. *
- * page_hdr Puts a header on each page. *
- * type Reutrns the type of character LETTER, DIGIT, *
- * other. *
- * strsave Saves a string in memory. *
- * treex Puts tokens and line numbers in a binary tree. *
- * treexprint Prints out the tree to a file. *
- * add_line_num Puts a linenumber in the tree at the token it *
- * goes with. *
- * treenewline Adds a new line of tree token and numbers to the *
- * output file. *
- * list_alloc Makes space for the linked list. *
- * tree_alloc Makes space for the tree nodes. *
- * *
- ****************************************************************************
- * *
- * Revision history: *
- * *
- * v1.00 by Jay B. Bronaugh - 10/12/87 *
- * for C Programming class @ Phoenix College *
- * only exists as photocopied listing *
- * original name CCR *
- * *
- * v1.01 by Tom Goodgame - 09/25/88 *
- * typed in from listing using personal style *
- * changed declaration of character variables from int to char *
- * *
- * v1.10 by Tom Goodgame - 09/26/88 *
- * added code to allow use on Telix v3.0 SALT scripts *
- * modified get_token, added in_salt_comment & in_salt_quote *
- * added code for output to test file during debugging *
- * currently commented out *
- * *
- * v1.20 by Tom Goodgame - 09/27/88 *
- * change user interface so that USAGE line is shown when there *
- * are no parameters supplied, instead of prompting for the *
- * file names *
- * add sensing of command line switches, first switch to be *
- * added will be for indicating that input file is a Telix *
- * SALT script (instead of relying on detection of SALT type *
- * comments) *
- * fixed ALL compiler warnings *
- * Added BOOLEAN type for flags (specialized int) in boolean.h *
- * *
- * v1.21 by Tom Goodgame - 09/28/88 *
- * bug created by overchecking comment syntax caused "syntax" *
- * error when faced with a divide (i.e., x/y) *
- * *
- * v1.22 by Tom Goodgame - 10/02/88 *
- * change appearance of Copyright notice *
- * improved variable naming *
- * improved message text from errors *
- * changed test for /s switch so it looked for both upper and *
- * lower case 's'. *
- * *
- * v1.23 by Tom Goodgame - 10/10/88 *
- * get version number correct in USAGE output *
- * *
- * Planned for version 1.30 is auto line wrap. Currently lines can *
- * be 256 characters long and there is no attempt to wrap them. The *
- * program was originally written around a 132 character printer *
- * width. Input lines greater than 80 characters will run off the *
- * edge of the paper or be wrapped by the printer. *
- * *
- * Planned for v2.xx will be parameter files for syntax, keywords, *
- * etc. with a different set for each language so the program will *
- * be useable with any language and keywords will be separated *
- * from functions and variables. *
- * *
- ****************************************************************************
- * *
- * Copyright (C) 1988 by Thomas H. Goodgame, Jr. - all rights reserved *
- * *
- * Source code and executable modules are freely useable and *
- * distributable, subject to the following five conditions: *
- * *
- * 1) If they are included with a commercial package, no changes *
- * may be made to the source, they must be distributed in their *
- * entirety, and no charge can be made for these programs. *
- * *
- * 2) If they are distributed by a public domain/freeware/shareware *
- * distribution organization (PC-SIG, user group, etc.) the *
- * charge per diskette of programs must not exceed six dollars *
- * ($6). All files must be distributed together on one disk and *
- * preferably in one library or archive file. *
- * *
- * 3) If they are distributed by BBS, no additional charges above *
- * and beyond the connection charge (if any) may be made. All *
- * files must be distributed together in one library or archive *
- * file. *
- * *
- * 4) Individuals and educational institutions may distribute these *
- * programs without charge. They may also modify the source for *
- * their purposes so long as attribution is made. They should *
- * also indicate what the changes were, whom by, and the date. *
- * Copyright should be asserted to prevent the code from going *
- * public domain and then being commercialized. *
- * *
- * 5) Any other distribution not directly covered, must be made in *
- * the spirit of the above conditions. *
- * *
- * Contact: Tom Goodgame via CompuServe UserID 76327,2053 *
- * *
- * or *
- * *
- * Tom Goodgame via Flying Circus BBS (602) 437-1301 *
- * CentraLink BBS (602) 254-9031 *
- * Inn on the Park BBS (602) 957-0631 *
- * ASU Underground BBS (602) 968-2814 *
- * Tool Shop BBS (602) 279-2673 *
- * *
- * or *
- * *
- * Thomas Goodgame via Phoenix PCUG BBS (602) 275-5558 *
- * *
- * *
- ****************************************************************************/
-